package org.lemon.cla.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.lemon.cla.enums.FeedbackTypeEnum;
import org.lemon.cla.enums.FeedbackStatusEnum;
import org.lemon.cla.enums.UserRoleEnum; // 导入用户角色枚举

import java.time.LocalDateTime;

@Data
@Schema(description = "应用反馈视图对象 (包含用户信息)")
public class FeedbackVo {

    @Schema(description = "反馈ID", example = "1")
    private Long feedbackId;

    @Schema(description = "用户ID (反馈提交者ID)", example = "101")
    private Long userId;

    // --- 反馈提交者用户信息 ---
    @Schema(description = "提交者用户名", example = "feedback_user")
    private String username; // 对应 User 的 username

    @Schema(description = "提交者头像URL", example = "http://example.com/user_avatar.jpg")
    private String avatarUrl; // 对应 User 的 avatar_url

    @Schema(description = "提交者真名", example = "李四")
    private String realName; // 对应 User 的 real_name

    @Schema(description = "提交者手机号", example = "13511112222")
    private String phone; // 对应 User 的 phone

    @Schema(description = "提交者邮箱", example = "user@example.com")
    private String email; // 对应 User 的 email

    @Schema(description = "提交者用户角色", example = "学生")
    private UserRoleEnum userRole; // 对应 User 的 role

    @Schema(description = "提交者用户是否已逻辑删除 (如果为true，则以上用户信息应显示为'未知')", example = "false")
    private Boolean userIsDeleted; // 新增字段：用户是否已逻辑删除

    @Schema(description = "反馈类型", example = "建议", allowableValues = {"错误", "建议", "投诉", "其他"})
    private FeedbackTypeEnum feedbackType;

    @Schema(description = "反馈内容", example = "希望App能增加夜间模式。")
    private String content;

    @Schema(description = "联系方式", example = "13800138000")
    private String contact;

    @Schema(description = "创建时间", example = "2024-06-25T10:00:00")
    private LocalDateTime createTime;

    @Schema(description = "处理状态", example = "待处理", allowableValues = {"待处理", "处理中", "已解决", "已关闭"})
    private FeedbackStatusEnum status;

    @Schema(description = "管理员回复", example = "您的建议已收到，感谢！")
    private String reply;

    @Schema(description = "回复时间", example = "2024-06-26T15:00:00")
    private LocalDateTime replyTime;
}
